#ifndef FUNCTIONLIST_H
#define FUNCTIONLIST_H


#include "Function.h"
#include <fstream>      
#include <string.h>

class FunctionElem {
	public:
		FunctionElem* Next;
		Function* Fct;
		FunctionElem(Function*);
		~FunctionElem();
};


class FunctionList {
	FunctionElem* Head;
	FunctionElem* Current;
	long Length;
	public:	
		FunctionList();
		~FunctionList();
		
		void addFront(Function*);
		Function* pop();
		bool isEmpty();
		int getLength();
		Function* getFirstFunction();
		Function* getNextFunction();
		void print();
		void mirror();
		void detachAllFunctions();
	    void load(string);
	    void getOneOfEachFunction(FunctionList*);
	    long nbOccurrence(string);
	    void filterOutFunctions();
	    void save(char*);
};

#endif

